{extend name='public/base' /}

{block name="content"}
<main class="content" style="min-height: 721px;">

    <div id="tags" class="container chip-container">
        <div class="card">
            <div class="card-content">
                <div class="tag-title center-align">
                    <i class="fas fa-tags"></i>&nbsp;&nbsp;文章标签
                </div>
                <div class="tag-chips">

                    {volist name='tag_num' id="v"}

                    <a href="/tag_show/{$v.name}" title="{$v.name}: {$v.articletag_count}">
                        <span class="chip center-align waves-effect waves-light chip-default {if $name!=$v.name} categary_color {/if}" {if $name==$v.name} style="background-color: red;color: white" {/if}" data-tagname="{$v.name}" >{$v.name}
                        <span class="tag-length" {if $name==$v.name} style="color: white" {/if}>{$v.articletag_count}</span>
                        </span>
                    </a>
                    {/volist}

                </div>
            </div>
        </div>
    </div>

    <article id="articles" class="container articles" style="position: relative; height: 1166px;">
        <div class="row tags-posts" id="tag_html">

            {volist name="list" id="v"}
            <div class="article tag-post col s12 m6 l4 aos-init aos-animate" data-tags="{$v.cates.name}" data-aos="fade-up" style="position: absolute; left: 0px; top: 0px;">
                <div class="card">
                    <a href="{$v.url}">
                        <div class="card-image tag-image">
                            <img src="{empty name='$v.img_url'}{$domain}/assets/img/frontend/123.jpg {else /} {$v.img_url} {/empty}" class="responsive-img" alt="{$v.title}">
                            <span class="card-title">{$v.title}</span>
                        </div>
                    </a>
                    <div class="card-content article-content">
                        <div class="publish-info">
                                <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>{$v.createtime}
                            </span>
                            <span class="publish-author">
                                <i class="fas fa-bookmark fa-fw icon-category"></i>
                                <a href="{$v.cates.url}" target="_blank" class="post-category">
                                {$v.cates.name}
                                </a>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            {/volist}

        </div>
    </article>

</main>

<div class="container paging">
    <div class="row" style="text-align: center">
        {$page|raw}
    </div>
</div>


<script>
    $(function () {
        $(".categary_color").each(function (i) {
            $(this).css({"background": rand_color()});
        });
    });
</script>

{/block}

